package com.lyq.vo;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.xinyirun.wms.bean.system.config.base.BaseVo;
import com.xinyirun.wms.bean.system.vo.common.condition.PageCondition;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

@Data
@EqualsAndHashCode(callSuper = false)
@NoArgsConstructor
public class TestGoodsInVo extends BaseVo implements Serializable {

    private static final long serialVersionUID = -6703892724147892420L;


    /**
     * 换页条件
     */
    private PageCondition pageCondition;

    /**
     * 主键id
     */
    private Integer id;

    /**
     * 商品名称
     */
    private String goodsName;

    /**
     * 商品描述
     */
    private String goodsDescription;

    /**
     * 商品最低价
     */
    private Integer goodsMinPrice;

    /**
     * 商品最高价
     */
    private Integer goodsMaxPrice;

    /**
     * 商品规格json示例[{"specName": "内存","shorNum":"规格排序值","specType": [128G,256G,512G]}]
     */
    private String goodsSpecJson;


    private String goodsAttributeJson;


    /**
     * 规格接收List
     */
    @JsonSerialize
    private List<GoodsSpecJson> goodsSpecList;

    /**
     * sku接收List
     */
    private List<GoodsSkuJson> goodsSkuList;

    /**
     * 属性接收List
     */
    private List<GoodsAttributeJson> goodsAttributeList;

    /**
     * ids
     */
    private List<Integer> ids;

    /**
     * 导出类型 1=选择导出 2=导出当前页 3=导出全部
     */
    private Integer idType;

    /**
     * 商品规格json示例[{"specName": "内存","shorNum":"规格排序值","specType": [128G,256G,512G]}]
     */
    @Data
    public class GoodsSpecJson {
        /**
         * 规格名称
         */
        private String specName;

        /**
         * 排序值
         */
        private Integer shorNum;

        /**
         * 规格值数组
         */
        private String specType;
    }

    @Data
    public class GoodsSkuJson {
        /**
         * 规格值code 按照选中规格code排序存入 实例: 规格值1,规格值2,规格值3
         */
        private String specCode;

        /**
         * 售价
         */
        private Integer skuPrice;

        /**
         * sku库存
         */
        private Integer skuInventory;
    }

    @Data
    public class GoodsAttributeJson {
        /**
         * 名称
         */
        private String attributeName;

        /**
         * 排序
         */
        private Integer shorNum;

        /**
         * 名称
         */
        private String attributeVal;
    }

}
